<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>OPCPackage (POI API Documentation)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="OPCPackage (POI API Documentation)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/OPCPackage.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/poi/openxml4j/opc/EncryptionOption.html" title="enum in org.apache.poi.openxml4j.opc"><span class="strong">PREV CLASS</span></a></li>
<li><a href="../../../../../org/apache/poi/openxml4j/opc/Package.html" title="class in org.apache.poi.openxml4j.opc"><span class="strong">NEXT CLASS</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/poi/openxml4j/opc/OPCPackage.html" target="_top">FRAMES</a></li>
<li><a href="OPCPackage.html" target="_top">NO FRAMES</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>SUMMARY:&nbsp;</li>
<li>NESTED&nbsp;|&nbsp;</li>
<li><a href="#field_summary">FIELD</a>&nbsp;|&nbsp;</li>
<li>CONSTR&nbsp;|&nbsp;</li>
<li><a href="#method_summary">METHOD</a></li>
</ul>
<ul class="subNavList">
<li>DETAIL:&nbsp;</li>
<li><a href="#field_detail">FIELD</a>&nbsp;|&nbsp;</li>
<li>CONSTR&nbsp;|&nbsp;</li>
<li><a href="#method_detail">METHOD</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<p class="subTitle">org.apache.poi.openxml4j.opc</p>
<h2 title="Class OPCPackage" class="title">Class OPCPackage</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.poi.openxml4j.opc.OPCPackage</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.io.Closeable, <a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html" title="interface in org.apache.poi.openxml4j.opc">RelationshipSource</a></dd>
</dl>
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../../../../org/apache/poi/openxml4j/opc/Package.html" title="class in org.apache.poi.openxml4j.opc">Package</a></dd>
</dl>
<hr>
<br>
<pre>public abstract class <strong>OPCPackage</strong>
extends java.lang.Object
implements <a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html" title="interface in org.apache.poi.openxml4j.opc">RelationshipSource</a>, java.io.Closeable</pre>
<div class="block">Represents a container that can store multiple data objects.</div>
<dl><dt><span class="strong">Version:</span></dt>
  <dd>0.1</dd>
<dt><span class="strong">Author:</span></dt>
  <dd>Julien Chable, CDubet</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/poi/openxml4j/opc/internal/ContentTypeManager.html" title="class in org.apache.poi.openxml4j.opc.internal">ContentTypeManager</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#contentTypeManager">contentTypeManager</a></strong></code>
<div class="block">Manage parts content types of this package.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static <a href="../../../../../org/apache/poi/openxml4j/opc/PackageAccess.html" title="enum in org.apache.poi.openxml4j.opc">PackageAccess</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#defaultPackageAccess">defaultPackageAccess</a></strong></code>
<div class="block">Default package access.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/poi/openxml4j/opc/internal/PartMarshaller.html" title="interface in org.apache.poi.openxml4j.opc.internal">PartMarshaller</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#defaultPartMarshaller">defaultPartMarshaller</a></strong></code>
<div class="block">Default part marshaller.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#isDirty">isDirty</a></strong></code>
<div class="block">Flag if a modification is done to the document.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#originalPackagePath">originalPackagePath</a></strong></code>
<div class="block">File path of this package.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected java.io.OutputStream</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#output">output</a></strong></code>
<div class="block">Output stream for writing this package.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/poi/openxml4j/opc/internal/PackagePropertiesPart.html" title="class in org.apache.poi.openxml4j.opc.internal">PackagePropertiesPart</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#packageProperties">packageProperties</a></strong></code>
<div class="block">Core package properties.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartCollection.html" title="class in org.apache.poi.openxml4j.opc">PackagePartCollection</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#partList">partList</a></strong></code>
<div class="block">Package parts collection.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected java.util.Hashtable&lt;<a href="../../../../../org/apache/poi/openxml4j/opc/internal/ContentType.html" title="class in org.apache.poi.openxml4j.opc.internal">ContentType</a>,<a href="../../../../../org/apache/poi/openxml4j/opc/internal/PartMarshaller.html" title="interface in org.apache.poi.openxml4j.opc.internal">PartMarshaller</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#partMarshallers">partMarshallers</a></strong></code>
<div class="block">Part marshallers by content type.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected java.util.Hashtable&lt;<a href="../../../../../org/apache/poi/openxml4j/opc/internal/ContentType.html" title="class in org.apache.poi.openxml4j.opc.internal">ContentType</a>,<a href="../../../../../org/apache/poi/openxml4j/opc/internal/PartUnmarshaller.html" title="interface in org.apache.poi.openxml4j.opc.internal">PartUnmarshaller</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#partUnmarshallers">partUnmarshallers</a></strong></code>
<div class="block">Part unmarshallers by content type.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/poi/openxml4j/opc/PackageRelationshipCollection.html" title="class in org.apache.poi.openxml4j.opc">PackageRelationshipCollection</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#relationships">relationships</a></strong></code>
<div class="block">Package relationships.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/poi/openxml4j/opc/PackageRelationship.html" title="class in org.apache.poi.openxml4j.opc">PackageRelationship</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#addExternalRelationship(java.lang.String, java.lang.String)">addExternalRelationship</a></strong>(java.lang.String&nbsp;target,
                       java.lang.String&nbsp;relationshipType)</code>
<div class="block">Adds an external relationship to a part (except relationships part).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/poi/openxml4j/opc/PackageRelationship.html" title="class in org.apache.poi.openxml4j.opc">PackageRelationship</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#addExternalRelationship(java.lang.String, java.lang.String, java.lang.String)">addExternalRelationship</a></strong>(java.lang.String&nbsp;target,
                       java.lang.String&nbsp;relationshipType,
                       java.lang.String&nbsp;id)</code>
<div class="block">Adds an external relationship to a part (except relationships part).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#addMarshaller(java.lang.String, org.apache.poi.openxml4j.opc.internal.PartMarshaller)">addMarshaller</a></strong>(java.lang.String&nbsp;contentType,
             <a href="../../../../../org/apache/poi/openxml4j/opc/internal/PartMarshaller.html" title="interface in org.apache.poi.openxml4j.opc.internal">PartMarshaller</a>&nbsp;marshaller)</code>
<div class="block">Add a marshaller.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#addPackagePart(org.apache.poi.openxml4j.opc.PackagePart)">addPackagePart</a></strong>(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a>&nbsp;part)</code>
<div class="block">Add the specified part to the package.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/poi/openxml4j/opc/PackageRelationship.html" title="class in org.apache.poi.openxml4j.opc">PackageRelationship</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#addRelationship(org.apache.poi.openxml4j.opc.PackagePartName, org.apache.poi.openxml4j.opc.TargetMode, java.lang.String)">addRelationship</a></strong>(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartName.html" title="class in org.apache.poi.openxml4j.opc">PackagePartName</a>&nbsp;targetPartName,
               <a href="../../../../../org/apache/poi/openxml4j/opc/TargetMode.html" title="enum in org.apache.poi.openxml4j.opc">TargetMode</a>&nbsp;targetMode,
               java.lang.String&nbsp;relationshipType)</code>
<div class="block">Add a package relationship.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/poi/openxml4j/opc/PackageRelationship.html" title="class in org.apache.poi.openxml4j.opc">PackageRelationship</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#addRelationship(org.apache.poi.openxml4j.opc.PackagePartName, org.apache.poi.openxml4j.opc.TargetMode, java.lang.String, java.lang.String)">addRelationship</a></strong>(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartName.html" title="class in org.apache.poi.openxml4j.opc">PackagePartName</a>&nbsp;targetPartName,
               <a href="../../../../../org/apache/poi/openxml4j/opc/TargetMode.html" title="enum in org.apache.poi.openxml4j.opc">TargetMode</a>&nbsp;targetMode,
               java.lang.String&nbsp;relationshipType,
               java.lang.String&nbsp;relID)</code>
<div class="block">Add a relationship to the package (except relationships part).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#addThumbnail(java.lang.String)">addThumbnail</a></strong>(java.lang.String&nbsp;path)</code>
<div class="block">Add a thumbnail to the package.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#addUnmarshaller(java.lang.String, org.apache.poi.openxml4j.opc.internal.PartUnmarshaller)">addUnmarshaller</a></strong>(java.lang.String&nbsp;contentType,
               <a href="../../../../../org/apache/poi/openxml4j/opc/internal/PartUnmarshaller.html" title="interface in org.apache.poi.openxml4j.opc.internal">PartUnmarshaller</a>&nbsp;unmarshaller)</code>
<div class="block">Add an unmarshaller.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#clearRelationships()">clearRelationships</a></strong>()</code>
<div class="block">Clear package relationships.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#close()">close</a></strong>()</code>
<div class="block">Close the open, writable package and save its content.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected abstract void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#closeImpl()">closeImpl</a></strong>()</code>
<div class="block">Close the package and cause a save of the package.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#containPart(org.apache.poi.openxml4j.opc.PackagePartName)">containPart</a></strong>(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartName.html" title="class in org.apache.poi.openxml4j.opc">PackagePartName</a>&nbsp;partName)</code>
<div class="block">Check if a part already exists in this package from its name.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html" title="class in org.apache.poi.openxml4j.opc">OPCPackage</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#create(java.io.File)">create</a></strong>(java.io.File&nbsp;file)</code>
<div class="block">Creates a new package.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html" title="class in org.apache.poi.openxml4j.opc">OPCPackage</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#create(java.io.OutputStream)">create</a></strong>(java.io.OutputStream&nbsp;output)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html" title="class in org.apache.poi.openxml4j.opc">OPCPackage</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#create(java.lang.String)">create</a></strong>(java.lang.String&nbsp;path)</code>
<div class="block">Creates a new package.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#createPart(org.apache.poi.openxml4j.opc.PackagePartName, java.lang.String)">createPart</a></strong>(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartName.html" title="class in org.apache.poi.openxml4j.opc">PackagePartName</a>&nbsp;partName,
          java.lang.String&nbsp;contentType)</code>
<div class="block">Create and add a part, with the specified name and content type, to the
 package.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#createPart(org.apache.poi.openxml4j.opc.PackagePartName, java.lang.String, java.io.ByteArrayOutputStream)">createPart</a></strong>(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartName.html" title="class in org.apache.poi.openxml4j.opc">PackagePartName</a>&nbsp;partName,
          java.lang.String&nbsp;contentType,
          java.io.ByteArrayOutputStream&nbsp;content)</code>
<div class="block">Add a part to the package.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected abstract <a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#createPartImpl(org.apache.poi.openxml4j.opc.PackagePartName, java.lang.String, boolean)">createPartImpl</a></strong>(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartName.html" title="class in org.apache.poi.openxml4j.opc">PackagePartName</a>&nbsp;partName,
              java.lang.String&nbsp;contentType,
              boolean&nbsp;loadRelationships)</code>
<div class="block">Core method to create a package part.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#deletePart(org.apache.poi.openxml4j.opc.PackagePartName)">deletePart</a></strong>(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartName.html" title="class in org.apache.poi.openxml4j.opc">PackagePartName</a>&nbsp;partName)</code>
<div class="block">Delete the part with the specified name and its associated relationships
 part if one exists.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#deletePartRecursive(org.apache.poi.openxml4j.opc.PackagePartName)">deletePartRecursive</a></strong>(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartName.html" title="class in org.apache.poi.openxml4j.opc">PackagePartName</a>&nbsp;partName)</code>
<div class="block">Delete the part with the specified name and all part listed in its
 associated relationships part if one exists.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#ensureRelationships()">ensureRelationships</a></strong>()</code>
<div class="block">Ensure that the relationships collection is not null.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#flush()">flush</a></strong>()</code>
<div class="block">Flush the package : save all.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected abstract void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#flushImpl()">flushImpl</a></strong>()</code>
<div class="block">Flush the package but not save.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/poi/openxml4j/opc/PackageAccess.html" title="enum in org.apache.poi.openxml4j.opc">PackageAccess</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#getPackageAccess()">getPackageAccess</a></strong>()</code>
<div class="block">Get the package access mode.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/poi/openxml4j/opc/PackageProperties.html" title="interface in org.apache.poi.openxml4j.opc">PackageProperties</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#getPackageProperties()">getPackageProperties</a></strong>()</code>
<div class="block">Retrieves or creates if none exists, core package property part.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#getPart(org.apache.poi.openxml4j.opc.PackagePartName)">getPart</a></strong>(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartName.html" title="class in org.apache.poi.openxml4j.opc">PackagePartName</a>&nbsp;partName)</code>
<div class="block">Retrieve a part identified by its name.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#getPart(org.apache.poi.openxml4j.opc.PackageRelationship)">getPart</a></strong>(<a href="../../../../../org/apache/poi/openxml4j/opc/PackageRelationship.html" title="class in org.apache.poi.openxml4j.opc">PackageRelationship</a>&nbsp;partRel)</code>
<div class="block">Get the target part from the specified relationship.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected abstract <a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#getPartImpl(org.apache.poi.openxml4j.opc.PackagePartName)">getPartImpl</a></strong>(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartName.html" title="class in org.apache.poi.openxml4j.opc">PackagePartName</a>&nbsp;partName)</code>
<div class="block">Get the package part mapped to the specified URI.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.util.ArrayList&lt;<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#getParts()">getParts</a></strong>()</code>
<div class="block">Load the parts of the archive if it has not been done yet.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.util.ArrayList&lt;<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#getPartsByContentType(java.lang.String)">getPartsByContentType</a></strong>(java.lang.String&nbsp;contentType)</code>
<div class="block">Retrieve parts by content type.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.util.List&lt;<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#getPartsByName(java.util.regex.Pattern)">getPartsByName</a></strong>(java.util.regex.Pattern&nbsp;namePattern)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.util.ArrayList&lt;<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#getPartsByRelationshipType(java.lang.String)">getPartsByRelationshipType</a></strong>(java.lang.String&nbsp;relationshipType)</code>
<div class="block">Retrieve parts by relationship type.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected abstract <a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a>[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#getPartsImpl()">getPartsImpl</a></strong>()</code>
<div class="block">Get all parts link to the package.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/poi/openxml4j/opc/PackageRelationship.html" title="class in org.apache.poi.openxml4j.opc">PackageRelationship</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#getRelationship(java.lang.String)">getRelationship</a></strong>(java.lang.String&nbsp;id)</code>
<div class="block">Retrieves a package relationship from its id.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/poi/openxml4j/opc/PackageRelationshipCollection.html" title="class in org.apache.poi.openxml4j.opc">PackageRelationshipCollection</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#getRelationships()">getRelationships</a></strong>()</code>
<div class="block">Retrieves all package relationships.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/poi/openxml4j/opc/PackageRelationshipCollection.html" title="class in org.apache.poi.openxml4j.opc">PackageRelationshipCollection</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#getRelationshipsByType(java.lang.String)">getRelationshipsByType</a></strong>(java.lang.String&nbsp;relationshipType)</code>
<div class="block">Retrieves all relationships with the specified type.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#hasRelationships()">hasRelationships</a></strong>()</code>
<div class="block">Knows if the part have any relationships.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#isRelationshipExists(org.apache.poi.openxml4j.opc.PackageRelationship)">isRelationshipExists</a></strong>(<a href="../../../../../org/apache/poi/openxml4j/opc/PackageRelationship.html" title="class in org.apache.poi.openxml4j.opc">PackageRelationship</a>&nbsp;rel)</code>
<div class="block">Checks if the specified relationship is part of this package part.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html" title="class in org.apache.poi.openxml4j.opc">OPCPackage</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#open(java.io.File)">open</a></strong>(java.io.File&nbsp;file)</code>
<div class="block">Open a package with read/write permission.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html" title="class in org.apache.poi.openxml4j.opc">OPCPackage</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#open(java.io.File, org.apache.poi.openxml4j.opc.PackageAccess)">open</a></strong>(java.io.File&nbsp;file,
    <a href="../../../../../org/apache/poi/openxml4j/opc/PackageAccess.html" title="enum in org.apache.poi.openxml4j.opc">PackageAccess</a>&nbsp;access)</code>
<div class="block">Open a package.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html" title="class in org.apache.poi.openxml4j.opc">OPCPackage</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#open(java.io.InputStream)">open</a></strong>(java.io.InputStream&nbsp;in)</code>
<div class="block">Open a package.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html" title="class in org.apache.poi.openxml4j.opc">OPCPackage</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#open(java.lang.String)">open</a></strong>(java.lang.String&nbsp;path)</code>
<div class="block">Open a package with read/write permission.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html" title="class in org.apache.poi.openxml4j.opc">OPCPackage</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#open(java.lang.String, org.apache.poi.openxml4j.opc.PackageAccess)">open</a></strong>(java.lang.String&nbsp;path,
    <a href="../../../../../org/apache/poi/openxml4j/opc/PackageAccess.html" title="enum in org.apache.poi.openxml4j.opc">PackageAccess</a>&nbsp;access)</code>
<div class="block">Open a package.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html" title="class in org.apache.poi.openxml4j.opc">OPCPackage</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#openOrCreate(java.io.File)">openOrCreate</a></strong>(java.io.File&nbsp;file)</code>
<div class="block">Opens a package if it exists, else it creates one.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#removeMarshaller(java.lang.String)">removeMarshaller</a></strong>(java.lang.String&nbsp;contentType)</code>
<div class="block">Remove a marshaller by its content type.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#removePart(org.apache.poi.openxml4j.opc.PackagePart)">removePart</a></strong>(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a>&nbsp;part)</code>
<div class="block">Remove the specified part in this package.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#removePart(org.apache.poi.openxml4j.opc.PackagePartName)">removePart</a></strong>(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartName.html" title="class in org.apache.poi.openxml4j.opc">PackagePartName</a>&nbsp;partName)</code>
<div class="block">Remove a part in this package.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected abstract void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#removePartImpl(org.apache.poi.openxml4j.opc.PackagePartName)">removePartImpl</a></strong>(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartName.html" title="class in org.apache.poi.openxml4j.opc">PackagePartName</a>&nbsp;partName)</code>
<div class="block">Core method to delete a package part.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#removePartRecursive(org.apache.poi.openxml4j.opc.PackagePartName)">removePartRecursive</a></strong>(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartName.html" title="class in org.apache.poi.openxml4j.opc">PackagePartName</a>&nbsp;partName)</code>
<div class="block">Remove a part from this package as well as its relationship part, if one
 exists, and all parts listed in the relationship part.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#removeRelationship(java.lang.String)">removeRelationship</a></strong>(java.lang.String&nbsp;id)</code>
<div class="block">Delete a relationship from this package.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#removeUnmarshaller(java.lang.String)">removeUnmarshaller</a></strong>(java.lang.String&nbsp;contentType)</code>
<div class="block">Remove an unmarshaller by its content type.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#replaceContentType(java.lang.String, java.lang.String)">replaceContentType</a></strong>(java.lang.String&nbsp;oldContentType,
                  java.lang.String&nbsp;newContentType)</code>
<div class="block">Replace a content type in this package.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#revert()">revert</a></strong>()</code>
<div class="block">Close the package WITHOUT saving its content.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected abstract void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#revertImpl()">revertImpl</a></strong>()</code>
<div class="block">Close the package without saving the document.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#save(java.io.File)">save</a></strong>(java.io.File&nbsp;targetFile)</code>
<div class="block">Save the document in the specified file.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#save(java.io.OutputStream)">save</a></strong>(java.io.OutputStream&nbsp;outputStream)</code>
<div class="block">Save the document in the specified output stream.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected abstract void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#saveImpl(java.io.OutputStream)">saveImpl</a></strong>(java.io.OutputStream&nbsp;outputStream)</code>
<div class="block">Save the package into the specified output stream.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#validatePackage(org.apache.poi.openxml4j.opc.OPCPackage)">validatePackage</a></strong>(<a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html" title="class in org.apache.poi.openxml4j.opc">OPCPackage</a>&nbsp;pkg)</code>
<div class="block">Validates the package compliance with the OPC specifications.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a name="defaultPackageAccess">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>defaultPackageAccess</h4>
<pre>protected static final&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/PackageAccess.html" title="enum in org.apache.poi.openxml4j.opc">PackageAccess</a> defaultPackageAccess</pre>
<div class="block">Default package access.</div>
</li>
</ul>
<a name="partList">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>partList</h4>
<pre>protected&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartCollection.html" title="class in org.apache.poi.openxml4j.opc">PackagePartCollection</a> partList</pre>
<div class="block">Package parts collection.</div>
</li>
</ul>
<a name="relationships">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>relationships</h4>
<pre>protected&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/PackageRelationshipCollection.html" title="class in org.apache.poi.openxml4j.opc">PackageRelationshipCollection</a> relationships</pre>
<div class="block">Package relationships.</div>
</li>
</ul>
<a name="partMarshallers">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>partMarshallers</h4>
<pre>protected&nbsp;java.util.Hashtable&lt;<a href="../../../../../org/apache/poi/openxml4j/opc/internal/ContentType.html" title="class in org.apache.poi.openxml4j.opc.internal">ContentType</a>,<a href="../../../../../org/apache/poi/openxml4j/opc/internal/PartMarshaller.html" title="interface in org.apache.poi.openxml4j.opc.internal">PartMarshaller</a>&gt; partMarshallers</pre>
<div class="block">Part marshallers by content type.</div>
</li>
</ul>
<a name="defaultPartMarshaller">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>defaultPartMarshaller</h4>
<pre>protected&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/internal/PartMarshaller.html" title="interface in org.apache.poi.openxml4j.opc.internal">PartMarshaller</a> defaultPartMarshaller</pre>
<div class="block">Default part marshaller.</div>
</li>
</ul>
<a name="partUnmarshallers">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>partUnmarshallers</h4>
<pre>protected&nbsp;java.util.Hashtable&lt;<a href="../../../../../org/apache/poi/openxml4j/opc/internal/ContentType.html" title="class in org.apache.poi.openxml4j.opc.internal">ContentType</a>,<a href="../../../../../org/apache/poi/openxml4j/opc/internal/PartUnmarshaller.html" title="interface in org.apache.poi.openxml4j.opc.internal">PartUnmarshaller</a>&gt; partUnmarshallers</pre>
<div class="block">Part unmarshallers by content type.</div>
</li>
</ul>
<a name="packageProperties">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>packageProperties</h4>
<pre>protected&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/internal/PackagePropertiesPart.html" title="class in org.apache.poi.openxml4j.opc.internal">PackagePropertiesPart</a> packageProperties</pre>
<div class="block">Core package properties.</div>
</li>
</ul>
<a name="contentTypeManager">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>contentTypeManager</h4>
<pre>protected&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/internal/ContentTypeManager.html" title="class in org.apache.poi.openxml4j.opc.internal">ContentTypeManager</a> contentTypeManager</pre>
<div class="block">Manage parts content types of this package.</div>
</li>
</ul>
<a name="isDirty">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isDirty</h4>
<pre>protected&nbsp;boolean isDirty</pre>
<div class="block">Flag if a modification is done to the document.</div>
</li>
</ul>
<a name="originalPackagePath">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>originalPackagePath</h4>
<pre>protected&nbsp;java.lang.String originalPackagePath</pre>
<div class="block">File path of this package.</div>
</li>
</ul>
<a name="output">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>output</h4>
<pre>protected&nbsp;java.io.OutputStream output</pre>
<div class="block">Output stream for writing this package.</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="open(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>open</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html" title="class in org.apache.poi.openxml4j.opc">OPCPackage</a>&nbsp;open(java.lang.String&nbsp;path)
                       throws <a href="../../../../../org/apache/poi/openxml4j/exceptions/InvalidFormatException.html" title="class in org.apache.poi.openxml4j.exceptions">InvalidFormatException</a></pre>
<div class="block">Open a package with read/write permission.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>path</code> - The document path.</dd>
<dt><span class="strong">Returns:</span></dt><dd>A Package object, else <b>null</b>.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/poi/openxml4j/exceptions/InvalidFormatException.html" title="class in org.apache.poi.openxml4j.exceptions">InvalidFormatException</a></code> - If the specified file doesn't exist, and a parsing error
             occur.</dd></dl>
</li>
</ul>
<a name="open(java.io.File)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>open</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html" title="class in org.apache.poi.openxml4j.opc">OPCPackage</a>&nbsp;open(java.io.File&nbsp;file)
                       throws <a href="../../../../../org/apache/poi/openxml4j/exceptions/InvalidFormatException.html" title="class in org.apache.poi.openxml4j.exceptions">InvalidFormatException</a></pre>
<div class="block">Open a package with read/write permission.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>file</code> - The file to open.</dd>
<dt><span class="strong">Returns:</span></dt><dd>A Package object, else <b>null</b>.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/poi/openxml4j/exceptions/InvalidFormatException.html" title="class in org.apache.poi.openxml4j.exceptions">InvalidFormatException</a></code> - If the specified file doesn't exist, and a parsing error
             occur.</dd></dl>
</li>
</ul>
<a name="open(java.lang.String, org.apache.poi.openxml4j.opc.PackageAccess)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>open</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html" title="class in org.apache.poi.openxml4j.opc">OPCPackage</a>&nbsp;open(java.lang.String&nbsp;path,
              <a href="../../../../../org/apache/poi/openxml4j/opc/PackageAccess.html" title="enum in org.apache.poi.openxml4j.opc">PackageAccess</a>&nbsp;access)
                       throws <a href="../../../../../org/apache/poi/openxml4j/exceptions/InvalidFormatException.html" title="class in org.apache.poi.openxml4j.exceptions">InvalidFormatException</a></pre>
<div class="block">Open a package.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>path</code> - The document path.</dd><dd><code>access</code> - PackageBase access.</dd>
<dt><span class="strong">Returns:</span></dt><dd>A PackageBase object, else <b>null</b>.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/poi/openxml4j/exceptions/InvalidFormatException.html" title="class in org.apache.poi.openxml4j.exceptions">InvalidFormatException</a></code> - If the specified file doesn't exist, and a parsing error
             occur.</dd></dl>
</li>
</ul>
<a name="open(java.io.File, org.apache.poi.openxml4j.opc.PackageAccess)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>open</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html" title="class in org.apache.poi.openxml4j.opc">OPCPackage</a>&nbsp;open(java.io.File&nbsp;file,
              <a href="../../../../../org/apache/poi/openxml4j/opc/PackageAccess.html" title="enum in org.apache.poi.openxml4j.opc">PackageAccess</a>&nbsp;access)
                       throws <a href="../../../../../org/apache/poi/openxml4j/exceptions/InvalidFormatException.html" title="class in org.apache.poi.openxml4j.exceptions">InvalidFormatException</a></pre>
<div class="block">Open a package.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>file</code> - The file to open.</dd><dd><code>access</code> - PackageBase access.</dd>
<dt><span class="strong">Returns:</span></dt><dd>A PackageBase object, else <b>null</b>.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/poi/openxml4j/exceptions/InvalidFormatException.html" title="class in org.apache.poi.openxml4j.exceptions">InvalidFormatException</a></code> - If the specified file doesn't exist, and a parsing error
             occur.</dd></dl>
</li>
</ul>
<a name="open(java.io.InputStream)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>open</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html" title="class in org.apache.poi.openxml4j.opc">OPCPackage</a>&nbsp;open(java.io.InputStream&nbsp;in)
                       throws <a href="../../../../../org/apache/poi/openxml4j/exceptions/InvalidFormatException.html" title="class in org.apache.poi.openxml4j.exceptions">InvalidFormatException</a>,
                              java.io.IOException</pre>
<div class="block">Open a package.

 Note - uses quite a bit more memory than <a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#open(java.lang.String)"><code>open(String)</code></a>, which
 doesn't need to hold the whole zip file in memory, and can take advantage
 of native methods</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>in</code> - The InputStream to read the package from</dd>
<dt><span class="strong">Returns:</span></dt><dd>A PackageBase object</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/poi/openxml4j/exceptions/InvalidFormatException.html" title="class in org.apache.poi.openxml4j.exceptions">InvalidFormatException</a></code></dd>
<dd><code>java.io.IOException</code></dd></dl>
</li>
</ul>
<a name="openOrCreate(java.io.File)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>openOrCreate</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html" title="class in org.apache.poi.openxml4j.opc">OPCPackage</a>&nbsp;openOrCreate(java.io.File&nbsp;file)
                               throws <a href="../../../../../org/apache/poi/openxml4j/exceptions/InvalidFormatException.html" title="class in org.apache.poi.openxml4j.exceptions">InvalidFormatException</a></pre>
<div class="block">Opens a package if it exists, else it creates one.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>file</code> - The file to open or to create.</dd>
<dt><span class="strong">Returns:</span></dt><dd>A newly created package if the specified file does not exist,
         else the package extract from the file.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/poi/openxml4j/exceptions/InvalidFormatException.html" title="class in org.apache.poi.openxml4j.exceptions">InvalidFormatException</a></code> - Throws if the specified file exist and is not valid.</dd></dl>
</li>
</ul>
<a name="create(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>create</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html" title="class in org.apache.poi.openxml4j.opc">OPCPackage</a>&nbsp;create(java.lang.String&nbsp;path)</pre>
<div class="block">Creates a new package.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>path</code> - Path of the document.</dd>
<dt><span class="strong">Returns:</span></dt><dd>A newly created PackageBase ready to use.</dd></dl>
</li>
</ul>
<a name="create(java.io.File)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>create</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html" title="class in org.apache.poi.openxml4j.opc">OPCPackage</a>&nbsp;create(java.io.File&nbsp;file)</pre>
<div class="block">Creates a new package.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>file</code> - Path of the document.</dd>
<dt><span class="strong">Returns:</span></dt><dd>A newly created PackageBase ready to use.</dd></dl>
</li>
</ul>
<a name="create(java.io.OutputStream)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>create</h4>
<pre>public static&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html" title="class in org.apache.poi.openxml4j.opc">OPCPackage</a>&nbsp;create(java.io.OutputStream&nbsp;output)</pre>
</li>
</ul>
<a name="flush()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>flush</h4>
<pre>public&nbsp;void&nbsp;flush()</pre>
<div class="block">Flush the package : save all.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#close()"><code>close()</code></a></dd></dl>
</li>
</ul>
<a name="close()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>public&nbsp;void&nbsp;close()
           throws java.io.IOException</pre>
<div class="block">Close the open, writable package and save its content.
 
 If your package is open read only, then you should call <a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#revert()"><code>revert()</code></a>
  when finished with the package.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code>close</code>&nbsp;in interface&nbsp;<code>java.io.Closeable</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - If an IO exception occur during the saving process.</dd></dl>
</li>
</ul>
<a name="revert()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>revert</h4>
<pre>public&nbsp;void&nbsp;revert()</pre>
<div class="block">Close the package WITHOUT saving its content. Reinitialize this package
 and cancel all changes done to it.</div>
</li>
</ul>
<a name="addThumbnail(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addThumbnail</h4>
<pre>public&nbsp;void&nbsp;addThumbnail(java.lang.String&nbsp;path)
                  throws java.io.IOException</pre>
<div class="block">Add a thumbnail to the package. This method is provided to make easier
 the addition of a thumbnail in a package. You can do the same work by
 using the traditionnal relationship and part mechanism.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>path</code> - The full path to the image file.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd></dl>
</li>
</ul>
<a name="getPackageProperties()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPackageProperties</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/PackageProperties.html" title="interface in org.apache.poi.openxml4j.opc">PackageProperties</a>&nbsp;getPackageProperties()
                                       throws <a href="../../../../../org/apache/poi/openxml4j/exceptions/InvalidFormatException.html" title="class in org.apache.poi.openxml4j.exceptions">InvalidFormatException</a></pre>
<div class="block">Retrieves or creates if none exists, core package property part.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The PackageProperties part of this package.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/poi/openxml4j/exceptions/InvalidFormatException.html" title="class in org.apache.poi.openxml4j.exceptions">InvalidFormatException</a></code></dd></dl>
</li>
</ul>
<a name="getPart(org.apache.poi.openxml4j.opc.PackagePartName)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPart</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a>&nbsp;getPart(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartName.html" title="class in org.apache.poi.openxml4j.opc">PackagePartName</a>&nbsp;partName)</pre>
<div class="block">Retrieve a part identified by its name.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>partName</code> - Part name of the part to retrieve.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The part with the specified name, else <code>null</code>.</dd></dl>
</li>
</ul>
<a name="getPartsByContentType(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPartsByContentType</h4>
<pre>public&nbsp;java.util.ArrayList&lt;<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a>&gt;&nbsp;getPartsByContentType(java.lang.String&nbsp;contentType)</pre>
<div class="block">Retrieve parts by content type.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>contentType</code> - The content type criteria.</dd>
<dt><span class="strong">Returns:</span></dt><dd>All part associated to the specified content type.</dd></dl>
</li>
</ul>
<a name="getPartsByRelationshipType(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPartsByRelationshipType</h4>
<pre>public&nbsp;java.util.ArrayList&lt;<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a>&gt;&nbsp;getPartsByRelationshipType(java.lang.String&nbsp;relationshipType)</pre>
<div class="block">Retrieve parts by relationship type.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>relationshipType</code> - Relationship type.</dd>
<dt><span class="strong">Returns:</span></dt><dd>All parts which are the target of a relationship with the
         specified type, if the method can't retrieve relationships from
         the package, then return <code>null</code>.</dd></dl>
</li>
</ul>
<a name="getPartsByName(java.util.regex.Pattern)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPartsByName</h4>
<pre>public&nbsp;java.util.List&lt;<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a>&gt;&nbsp;getPartsByName(java.util.regex.Pattern&nbsp;namePattern)</pre>
</li>
</ul>
<a name="getPart(org.apache.poi.openxml4j.opc.PackageRelationship)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPart</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a>&nbsp;getPart(<a href="../../../../../org/apache/poi/openxml4j/opc/PackageRelationship.html" title="class in org.apache.poi.openxml4j.opc">PackageRelationship</a>&nbsp;partRel)</pre>
<div class="block">Get the target part from the specified relationship.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>partRel</code> - The part relationship uses to retrieve the part.</dd></dl>
</li>
</ul>
<a name="getParts()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getParts</h4>
<pre>public&nbsp;java.util.ArrayList&lt;<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a>&gt;&nbsp;getParts()
                                          throws <a href="../../../../../org/apache/poi/openxml4j/exceptions/InvalidFormatException.html" title="class in org.apache.poi.openxml4j.exceptions">InvalidFormatException</a></pre>
<div class="block">Load the parts of the archive if it has not been done yet. The
 relationships of each part are not loaded.
 
 Note - Rule M4.1 states that there may only ever be one Core
  Properties Part, but Office produced files will sometimes
  have multiple! As Office ignores all but the first, we relax
  Compliance with Rule M4.1, and ignore all others silently too.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>All this package's parts.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/poi/openxml4j/exceptions/InvalidFormatException.html" title="class in org.apache.poi.openxml4j.exceptions">InvalidFormatException</a></code></dd></dl>
</li>
</ul>
<a name="createPart(org.apache.poi.openxml4j.opc.PackagePartName, java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createPart</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a>&nbsp;createPart(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartName.html" title="class in org.apache.poi.openxml4j.opc">PackagePartName</a>&nbsp;partName,
                     java.lang.String&nbsp;contentType)</pre>
<div class="block">Create and add a part, with the specified name and content type, to the
 package.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>partName</code> - Part name.</dd><dd><code>contentType</code> - Part content type.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The newly created part.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/poi/openxml4j/exceptions/InvalidFormatException.html" title="class in org.apache.poi.openxml4j.exceptions">InvalidFormatException</a></code> - If rule M1.12 is not verified : Packages shall not contain
             equivalent part names and package implementers shall neither
             create nor recognize packages with equivalent part names.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#createPartImpl(org.apache.poi.openxml4j.opc.PackagePartName, java.lang.String, boolean)"><code>createPartImpl(PackagePartName, String, boolean)</code></a></dd></dl>
</li>
</ul>
<a name="createPart(org.apache.poi.openxml4j.opc.PackagePartName, java.lang.String, java.io.ByteArrayOutputStream)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createPart</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a>&nbsp;createPart(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartName.html" title="class in org.apache.poi.openxml4j.opc">PackagePartName</a>&nbsp;partName,
                     java.lang.String&nbsp;contentType,
                     java.io.ByteArrayOutputStream&nbsp;content)</pre>
<div class="block">Add a part to the package.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>partName</code> - Part name of the part to create.</dd><dd><code>contentType</code> - type associated with the file</dd><dd><code>content</code> - the contents to add. In order to have faster operation in
            document merge, the data are stored in memory not on a hard
            disk</dd>
<dt><span class="strong">Returns:</span></dt><dd>The new part.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#createPart(org.apache.poi.openxml4j.opc.PackagePartName, java.lang.String)"><code>createPart(PackagePartName, String)</code></a></dd></dl>
</li>
</ul>
<a name="addPackagePart(org.apache.poi.openxml4j.opc.PackagePart)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addPackagePart</h4>
<pre>protected&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a>&nbsp;addPackagePart(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a>&nbsp;part)</pre>
<div class="block">Add the specified part to the package. If a part already exists in the
 package with the same name as the one specified, then we replace the old
 part by the specified part.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>part</code> - The part to add (or replace).</dd>
<dt><span class="strong">Returns:</span></dt><dd>The part added to the package, the same as the one specified.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/poi/openxml4j/exceptions/InvalidFormatException.html" title="class in org.apache.poi.openxml4j.exceptions">InvalidFormatException</a></code> - If rule M1.12 is not verified : Packages shall not contain
             equivalent part names and package implementers shall neither
             create nor recognize packages with equivalent part names.</dd></dl>
</li>
</ul>
<a name="removePart(org.apache.poi.openxml4j.opc.PackagePart)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removePart</h4>
<pre>public&nbsp;void&nbsp;removePart(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a>&nbsp;part)</pre>
<div class="block">Remove the specified part in this package. If this part is relationship
 part, then delete all relationships in the source part.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>part</code> - The part to remove. If <code>null</code>, skip the action.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#removePart(org.apache.poi.openxml4j.opc.PackagePartName)"><code>removePart(PackagePartName)</code></a></dd></dl>
</li>
</ul>
<a name="removePart(org.apache.poi.openxml4j.opc.PackagePartName)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removePart</h4>
<pre>public&nbsp;void&nbsp;removePart(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartName.html" title="class in org.apache.poi.openxml4j.opc">PackagePartName</a>&nbsp;partName)</pre>
<div class="block">Remove a part in this package. If this part is relationship part, then
 delete all relationships in the source part.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>partName</code> - The part name of the part to remove.</dd></dl>
</li>
</ul>
<a name="removePartRecursive(org.apache.poi.openxml4j.opc.PackagePartName)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removePartRecursive</h4>
<pre>public&nbsp;void&nbsp;removePartRecursive(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartName.html" title="class in org.apache.poi.openxml4j.opc">PackagePartName</a>&nbsp;partName)
                         throws <a href="../../../../../org/apache/poi/openxml4j/exceptions/InvalidFormatException.html" title="class in org.apache.poi.openxml4j.exceptions">InvalidFormatException</a></pre>
<div class="block">Remove a part from this package as well as its relationship part, if one
 exists, and all parts listed in the relationship part. Be aware that this
 do not delete relationships which target the specified part.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>partName</code> - The name of the part to delete.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/poi/openxml4j/exceptions/InvalidFormatException.html" title="class in org.apache.poi.openxml4j.exceptions">InvalidFormatException</a></code> - Throws if the associated relationship part of the specified
             part is not valid.</dd></dl>
</li>
</ul>
<a name="deletePart(org.apache.poi.openxml4j.opc.PackagePartName)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deletePart</h4>
<pre>public&nbsp;void&nbsp;deletePart(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartName.html" title="class in org.apache.poi.openxml4j.opc">PackagePartName</a>&nbsp;partName)</pre>
<div class="block">Delete the part with the specified name and its associated relationships
 part if one exists. Prefer the use of this method to delete a part in the
 package, compare to the remove() methods that don't remove associated
 relationships part.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>partName</code> - Name of the part to delete</dd></dl>
</li>
</ul>
<a name="deletePartRecursive(org.apache.poi.openxml4j.opc.PackagePartName)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deletePartRecursive</h4>
<pre>public&nbsp;void&nbsp;deletePartRecursive(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartName.html" title="class in org.apache.poi.openxml4j.opc">PackagePartName</a>&nbsp;partName)</pre>
<div class="block">Delete the part with the specified name and all part listed in its
 associated relationships part if one exists. This process is recursively
 apply to all parts in the relationships part of the specified part.
 Prefer the use of this method to delete a part in the package, compare to
 the remove() methods that don't remove associated relationships part.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>partName</code> - Name of the part to delete</dd></dl>
</li>
</ul>
<a name="containPart(org.apache.poi.openxml4j.opc.PackagePartName)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>containPart</h4>
<pre>public&nbsp;boolean&nbsp;containPart(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartName.html" title="class in org.apache.poi.openxml4j.opc">PackagePartName</a>&nbsp;partName)</pre>
<div class="block">Check if a part already exists in this package from its name.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>partName</code> - Part name to check.</dd>
<dt><span class="strong">Returns:</span></dt><dd><i>true</i> if the part is logically added to this package, else
         <i>false</i>.</dd></dl>
</li>
</ul>
<a name="addRelationship(org.apache.poi.openxml4j.opc.PackagePartName, org.apache.poi.openxml4j.opc.TargetMode, java.lang.String, java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addRelationship</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/PackageRelationship.html" title="class in org.apache.poi.openxml4j.opc">PackageRelationship</a>&nbsp;addRelationship(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartName.html" title="class in org.apache.poi.openxml4j.opc">PackagePartName</a>&nbsp;targetPartName,
                                  <a href="../../../../../org/apache/poi/openxml4j/opc/TargetMode.html" title="enum in org.apache.poi.openxml4j.opc">TargetMode</a>&nbsp;targetMode,
                                  java.lang.String&nbsp;relationshipType,
                                  java.lang.String&nbsp;relID)</pre>
<div class="block">Add a relationship to the package (except relationships part).

 Check rule M4.1 : The format designer shall specify and the format
 producer shall create at most one core properties relationship for a
 package. A format consumer shall consider more than one core properties
 relationship for a package to be an error. If present, the relationship
 shall target the Core Properties part.

 Check rule M1.25: The Relationships part shall not have relationships to
 any other part. Package implementers shall enforce this requirement upon
 the attempt to create such a relationship and shall treat any such
 relationship as invalid.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html#addRelationship(org.apache.poi.openxml4j.opc.PackagePartName, org.apache.poi.openxml4j.opc.TargetMode, java.lang.String, java.lang.String)">addRelationship</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html" title="interface in org.apache.poi.openxml4j.opc">RelationshipSource</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>targetPartName</code> - Target part name.</dd><dd><code>targetMode</code> - Target mode, either Internal or External.</dd><dd><code>relationshipType</code> - Relationship type.</dd><dd><code>relID</code> - ID of the relationship.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The newly created and added relationship</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/poi/openxml4j/opc/PackageRelationshipTypes.html" title="interface in org.apache.poi.openxml4j.opc"><code>PackageRelationshipTypes</code></a></dd></dl>
</li>
</ul>
<a name="addRelationship(org.apache.poi.openxml4j.opc.PackagePartName, org.apache.poi.openxml4j.opc.TargetMode, java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addRelationship</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/PackageRelationship.html" title="class in org.apache.poi.openxml4j.opc">PackageRelationship</a>&nbsp;addRelationship(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartName.html" title="class in org.apache.poi.openxml4j.opc">PackagePartName</a>&nbsp;targetPartName,
                                  <a href="../../../../../org/apache/poi/openxml4j/opc/TargetMode.html" title="enum in org.apache.poi.openxml4j.opc">TargetMode</a>&nbsp;targetMode,
                                  java.lang.String&nbsp;relationshipType)</pre>
<div class="block">Add a package relationship.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html#addRelationship(org.apache.poi.openxml4j.opc.PackagePartName, org.apache.poi.openxml4j.opc.TargetMode, java.lang.String)">addRelationship</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html" title="interface in org.apache.poi.openxml4j.opc">RelationshipSource</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>targetPartName</code> - Target part name.</dd><dd><code>targetMode</code> - Target mode, either Internal or External.</dd><dd><code>relationshipType</code> - Relationship type.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The newly created and added relationship</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/poi/openxml4j/opc/PackageRelationshipTypes.html" title="interface in org.apache.poi.openxml4j.opc"><code>PackageRelationshipTypes</code></a></dd></dl>
</li>
</ul>
<a name="addExternalRelationship(java.lang.String, java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addExternalRelationship</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/PackageRelationship.html" title="class in org.apache.poi.openxml4j.opc">PackageRelationship</a>&nbsp;addExternalRelationship(java.lang.String&nbsp;target,
                                          java.lang.String&nbsp;relationshipType)</pre>
<div class="block">Adds an external relationship to a part (except relationships part).

 The targets of external relationships are not subject to the same
 validity checks that internal ones are, as the contents is potentially
 any file, URL or similar.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html#addExternalRelationship(java.lang.String, java.lang.String)">addExternalRelationship</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html" title="interface in org.apache.poi.openxml4j.opc">RelationshipSource</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>target</code> - External target of the relationship</dd><dd><code>relationshipType</code> - Type of relationship.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The newly created and added relationship</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html#addExternalRelationship(java.lang.String, java.lang.String)"><code>RelationshipSource.addExternalRelationship(java.lang.String,
      java.lang.String)</code></a></dd></dl>
</li>
</ul>
<a name="addExternalRelationship(java.lang.String, java.lang.String, java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addExternalRelationship</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/PackageRelationship.html" title="class in org.apache.poi.openxml4j.opc">PackageRelationship</a>&nbsp;addExternalRelationship(java.lang.String&nbsp;target,
                                          java.lang.String&nbsp;relationshipType,
                                          java.lang.String&nbsp;id)</pre>
<div class="block">Adds an external relationship to a part (except relationships part).

 The targets of external relationships are not subject to the same
 validity checks that internal ones are, as the contents is potentially
 any file, URL or similar.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html#addExternalRelationship(java.lang.String, java.lang.String, java.lang.String)">addExternalRelationship</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html" title="interface in org.apache.poi.openxml4j.opc">RelationshipSource</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>target</code> - External target of the relationship</dd><dd><code>relationshipType</code> - Type of relationship.</dd><dd><code>id</code> - Relationship unique id.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The newly created and added relationship</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html#addExternalRelationship(java.lang.String, java.lang.String)"><code>RelationshipSource.addExternalRelationship(java.lang.String,
      java.lang.String)</code></a></dd></dl>
</li>
</ul>
<a name="removeRelationship(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeRelationship</h4>
<pre>public&nbsp;void&nbsp;removeRelationship(java.lang.String&nbsp;id)</pre>
<div class="block">Delete a relationship from this package.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html#removeRelationship(java.lang.String)">removeRelationship</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html" title="interface in org.apache.poi.openxml4j.opc">RelationshipSource</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>id</code> - Id of the relationship to delete.</dd></dl>
</li>
</ul>
<a name="getRelationships()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRelationships</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/PackageRelationshipCollection.html" title="class in org.apache.poi.openxml4j.opc">PackageRelationshipCollection</a>&nbsp;getRelationships()</pre>
<div class="block">Retrieves all package relationships.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html#getRelationships()">getRelationships</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html" title="interface in org.apache.poi.openxml4j.opc">RelationshipSource</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>All package relationships of this package.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/poi/openxml4j/exceptions/OpenXML4JException.html" title="class in org.apache.poi.openxml4j.exceptions">OpenXML4JException</a></code></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#getRelationshipsHelper(java.lang.String)"><code>getRelationshipsHelper(String)</code></a></dd></dl>
</li>
</ul>
<a name="getRelationshipsByType(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRelationshipsByType</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/PackageRelationshipCollection.html" title="class in org.apache.poi.openxml4j.opc">PackageRelationshipCollection</a>&nbsp;getRelationshipsByType(java.lang.String&nbsp;relationshipType)</pre>
<div class="block">Retrieves all relationships with the specified type.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html#getRelationshipsByType(java.lang.String)">getRelationshipsByType</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html" title="interface in org.apache.poi.openxml4j.opc">RelationshipSource</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>relationshipType</code> - The filter specifying the relationship type.</dd>
<dt><span class="strong">Returns:</span></dt><dd>All relationships with the specified relationship type.</dd></dl>
</li>
</ul>
<a name="clearRelationships()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clearRelationships</h4>
<pre>public&nbsp;void&nbsp;clearRelationships()</pre>
<div class="block">Clear package relationships.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html#clearRelationships()">clearRelationships</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html" title="interface in org.apache.poi.openxml4j.opc">RelationshipSource</a></code></dd>
</dl>
</li>
</ul>
<a name="ensureRelationships()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureRelationships</h4>
<pre>public&nbsp;void&nbsp;ensureRelationships()</pre>
<div class="block">Ensure that the relationships collection is not null.</div>
</li>
</ul>
<a name="getRelationship(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRelationship</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/PackageRelationship.html" title="class in org.apache.poi.openxml4j.opc">PackageRelationship</a>&nbsp;getRelationship(java.lang.String&nbsp;id)</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html#getRelationship(java.lang.String)">RelationshipSource</a></code></strong></div>
<div class="block">Retrieves a package relationship from its id.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html#getRelationship(java.lang.String)">getRelationship</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html" title="interface in org.apache.poi.openxml4j.opc">RelationshipSource</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>id</code> - ID of the package relationship to retrieve.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The package relationship</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html#getRelationship(java.lang.String)"><code>RelationshipSource.getRelationship(java.lang.String)</code></a></dd></dl>
</li>
</ul>
<a name="hasRelationships()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasRelationships</h4>
<pre>public&nbsp;boolean&nbsp;hasRelationships()</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html#hasRelationships()">RelationshipSource</a></code></strong></div>
<div class="block">Knows if the part have any relationships.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html#hasRelationships()">hasRelationships</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html" title="interface in org.apache.poi.openxml4j.opc">RelationshipSource</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd><b>true</b> if the part have at least one relationship else
         <b>false</b>.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html#hasRelationships()"><code>RelationshipSource.hasRelationships()</code></a></dd></dl>
</li>
</ul>
<a name="isRelationshipExists(org.apache.poi.openxml4j.opc.PackageRelationship)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isRelationshipExists</h4>
<pre>public&nbsp;boolean&nbsp;isRelationshipExists(<a href="../../../../../org/apache/poi/openxml4j/opc/PackageRelationship.html" title="class in org.apache.poi.openxml4j.opc">PackageRelationship</a>&nbsp;rel)</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html#isRelationshipExists(org.apache.poi.openxml4j.opc.PackageRelationship)">RelationshipSource</a></code></strong></div>
<div class="block">Checks if the specified relationship is part of this package part.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html#isRelationshipExists(org.apache.poi.openxml4j.opc.PackageRelationship)">isRelationshipExists</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html" title="interface in org.apache.poi.openxml4j.opc">RelationshipSource</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>rel</code> - The relationship to check.</dd>
<dt><span class="strong">Returns:</span></dt><dd><b>true</b> if the specified relationship exists in this part,
         else returns <b>false</b></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/poi/openxml4j/opc/RelationshipSource.html#isRelationshipExists(org.apache.poi.openxml4j.opc.PackageRelationship)"><code>RelationshipSource.isRelationshipExists(org.apache.poi.openxml4j.opc.PackageRelationship)</code></a></dd></dl>
</li>
</ul>
<a name="addMarshaller(java.lang.String, org.apache.poi.openxml4j.opc.internal.PartMarshaller)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addMarshaller</h4>
<pre>public&nbsp;void&nbsp;addMarshaller(java.lang.String&nbsp;contentType,
                 <a href="../../../../../org/apache/poi/openxml4j/opc/internal/PartMarshaller.html" title="interface in org.apache.poi.openxml4j.opc.internal">PartMarshaller</a>&nbsp;marshaller)</pre>
<div class="block">Add a marshaller.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>contentType</code> - The content type to bind to the specified marshaller.</dd><dd><code>marshaller</code> - The marshaller to register with the specified content type.</dd></dl>
</li>
</ul>
<a name="addUnmarshaller(java.lang.String, org.apache.poi.openxml4j.opc.internal.PartUnmarshaller)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addUnmarshaller</h4>
<pre>public&nbsp;void&nbsp;addUnmarshaller(java.lang.String&nbsp;contentType,
                   <a href="../../../../../org/apache/poi/openxml4j/opc/internal/PartUnmarshaller.html" title="interface in org.apache.poi.openxml4j.opc.internal">PartUnmarshaller</a>&nbsp;unmarshaller)</pre>
<div class="block">Add an unmarshaller.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>contentType</code> - The content type to bind to the specified unmarshaller.</dd><dd><code>unmarshaller</code> - The unmarshaller to register with the specified content type.</dd></dl>
</li>
</ul>
<a name="removeMarshaller(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeMarshaller</h4>
<pre>public&nbsp;void&nbsp;removeMarshaller(java.lang.String&nbsp;contentType)</pre>
<div class="block">Remove a marshaller by its content type.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>contentType</code> - The content type associated with the marshaller to remove.</dd></dl>
</li>
</ul>
<a name="removeUnmarshaller(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeUnmarshaller</h4>
<pre>public&nbsp;void&nbsp;removeUnmarshaller(java.lang.String&nbsp;contentType)</pre>
<div class="block">Remove an unmarshaller by its content type.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>contentType</code> - The content type associated with the unmarshaller to remove.</dd></dl>
</li>
</ul>
<a name="getPackageAccess()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPackageAccess</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/PackageAccess.html" title="enum in org.apache.poi.openxml4j.opc">PackageAccess</a>&nbsp;getPackageAccess()</pre>
<div class="block">Get the package access mode.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the packageAccess The current package access.</dd></dl>
</li>
</ul>
<a name="validatePackage(org.apache.poi.openxml4j.opc.OPCPackage)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>validatePackage</h4>
<pre>public&nbsp;boolean&nbsp;validatePackage(<a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html" title="class in org.apache.poi.openxml4j.opc">OPCPackage</a>&nbsp;pkg)
                        throws <a href="../../../../../org/apache/poi/openxml4j/exceptions/InvalidFormatException.html" title="class in org.apache.poi.openxml4j.exceptions">InvalidFormatException</a></pre>
<div class="block">Validates the package compliance with the OPC specifications.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd><b>true</b> if the package is valid else <b>false</b></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/poi/openxml4j/exceptions/InvalidFormatException.html" title="class in org.apache.poi.openxml4j.exceptions">InvalidFormatException</a></code></dd></dl>
</li>
</ul>
<a name="save(java.io.File)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>save</h4>
<pre>public&nbsp;void&nbsp;save(java.io.File&nbsp;targetFile)
          throws java.io.IOException</pre>
<div class="block">Save the document in the specified file.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>targetFile</code> - Destination file.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - Throws if an IO exception occur.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#save(java.io.OutputStream)"><code>save(OutputStream)</code></a></dd></dl>
</li>
</ul>
<a name="save(java.io.OutputStream)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>save</h4>
<pre>public&nbsp;void&nbsp;save(java.io.OutputStream&nbsp;outputStream)
          throws java.io.IOException</pre>
<div class="block">Save the document in the specified output stream.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>outputStream</code> - The stream to save the package.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/poi/openxml4j/opc/OPCPackage.html#saveImpl(java.io.OutputStream)"><code>saveImpl(OutputStream)</code></a></dd></dl>
</li>
</ul>
<a name="createPartImpl(org.apache.poi.openxml4j.opc.PackagePartName, java.lang.String, boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createPartImpl</h4>
<pre>protected abstract&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a>&nbsp;createPartImpl(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartName.html" title="class in org.apache.poi.openxml4j.opc">PackagePartName</a>&nbsp;partName,
                         java.lang.String&nbsp;contentType,
                         boolean&nbsp;loadRelationships)</pre>
<div class="block">Core method to create a package part. This method must be implemented by
 the subclass.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>partName</code> - URI of the part to create.</dd><dd><code>contentType</code> - Content type of the part to create.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The newly created package part.</dd></dl>
</li>
</ul>
<a name="removePartImpl(org.apache.poi.openxml4j.opc.PackagePartName)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removePartImpl</h4>
<pre>protected abstract&nbsp;void&nbsp;removePartImpl(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartName.html" title="class in org.apache.poi.openxml4j.opc">PackagePartName</a>&nbsp;partName)</pre>
<div class="block">Core method to delete a package part. This method must be implemented by
 the subclass.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>partName</code> - The URI of the part to delete.</dd></dl>
</li>
</ul>
<a name="flushImpl()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>flushImpl</h4>
<pre>protected abstract&nbsp;void&nbsp;flushImpl()</pre>
<div class="block">Flush the package but not save.</div>
</li>
</ul>
<a name="closeImpl()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>closeImpl</h4>
<pre>protected abstract&nbsp;void&nbsp;closeImpl()
                           throws java.io.IOException</pre>
<div class="block">Close the package and cause a save of the package.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd></dl>
</li>
</ul>
<a name="revertImpl()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>revertImpl</h4>
<pre>protected abstract&nbsp;void&nbsp;revertImpl()</pre>
<div class="block">Close the package without saving the document. Discard all changes made
 to this package.</div>
</li>
</ul>
<a name="saveImpl(java.io.OutputStream)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>saveImpl</h4>
<pre>protected abstract&nbsp;void&nbsp;saveImpl(java.io.OutputStream&nbsp;outputStream)
                          throws java.io.IOException</pre>
<div class="block">Save the package into the specified output stream.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>outputStream</code> - The output stream use to save this package.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd></dl>
</li>
</ul>
<a name="getPartImpl(org.apache.poi.openxml4j.opc.PackagePartName)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPartImpl</h4>
<pre>protected abstract&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a>&nbsp;getPartImpl(<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePartName.html" title="class in org.apache.poi.openxml4j.opc">PackagePartName</a>&nbsp;partName)</pre>
<div class="block">Get the package part mapped to the specified URI.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>partName</code> - The URI of the part to retrieve.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The package part located by the specified URI, else <b>null</b>.</dd></dl>
</li>
</ul>
<a name="getPartsImpl()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPartsImpl</h4>
<pre>protected abstract&nbsp;<a href="../../../../../org/apache/poi/openxml4j/opc/PackagePart.html" title="class in org.apache.poi.openxml4j.opc">PackagePart</a>[]&nbsp;getPartsImpl()
                                       throws <a href="../../../../../org/apache/poi/openxml4j/exceptions/InvalidFormatException.html" title="class in org.apache.poi.openxml4j.exceptions">InvalidFormatException</a></pre>
<div class="block">Get all parts link to the package.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>A list of the part owned by the package.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/poi/openxml4j/exceptions/InvalidFormatException.html" title="class in org.apache.poi.openxml4j.exceptions">InvalidFormatException</a></code></dd></dl>
</li>
</ul>
<a name="replaceContentType(java.lang.String, java.lang.String)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>replaceContentType</h4>
<pre>public&nbsp;boolean&nbsp;replaceContentType(java.lang.String&nbsp;oldContentType,
                         java.lang.String&nbsp;newContentType)</pre>
<div class="block">Replace a content type in this package.

 <p>
     A typical scneario to call this method is to rename a template file to the main format, e.g.
     ".dotx" to ".docx"
     ".dotm" to ".docm"
     ".xltx" to ".xlsx"
     ".xltm" to ".xlsm"
     ".potx" to ".pptx"
     ".potm" to ".pptm"
 </p>
 For example, a code converting  a .xlsm macro workbook to .xlsx would look as follows:
 <p>
    <pre><code>

     OPCPackage pkg = OPCPackage.open(new FileInputStream("macro-workbook.xlsm"));
     pkg.replaceContentType(
         "application/vnd.ms-excel.sheet.macroEnabled.main+xml",
         "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml");

     FileOutputStream out = new FileOutputStream("workbook.xlsx");
     pkg.save(out);
     out.close();

    </code></pre>
 </p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>oldContentType</code> - the content type to be replaced</dd><dd><code>newContentType</code> - the replacement</dd>
<dt><span class="strong">Returns:</span></dt><dd>whether replacement was succesfull</dd><dt><span class="strong">Since:</span></dt>
  <dd>POI-3.8</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/OPCPackage.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/poi/openxml4j/opc/EncryptionOption.html" title="enum in org.apache.poi.openxml4j.opc"><span class="strong">PREV CLASS</span></a></li>
<li><a href="../../../../../org/apache/poi/openxml4j/opc/Package.html" title="class in org.apache.poi.openxml4j.opc"><span class="strong">NEXT CLASS</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/poi/openxml4j/opc/OPCPackage.html" target="_top">FRAMES</a></li>
<li><a href="OPCPackage.html" target="_top">NO FRAMES</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>SUMMARY:&nbsp;</li>
<li>NESTED&nbsp;|&nbsp;</li>
<li><a href="#field_summary">FIELD</a>&nbsp;|&nbsp;</li>
<li>CONSTR&nbsp;|&nbsp;</li>
<li><a href="#method_summary">METHOD</a></li>
</ul>
<ul class="subNavList">
<li>DETAIL:&nbsp;</li>
<li><a href="#field_detail">FIELD</a>&nbsp;|&nbsp;</li>
<li>CONSTR&nbsp;|&nbsp;</li>
<li><a href="#method_detail">METHOD</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>
                <i>Copyright 2014 The Apache Software Foundation or
        its licensors, as applicable.</i>
            </small></p>
</body>
</html>
